import { app, BrowserWindow } from 'electron';
import createWindow from './utils/createWindow';
import mountMainProcess from './loaders/mountMainProcess';
import initLocalConfig from './utils/initLocalConfig';


app.whenReady().then(() => {
  createWindow();
  initLocalConfig();
  mountMainProcess();
  app.on('activate', () => {
    if (BrowserWindow.getAllWindows().length === 0) {
      createWindow();
    }
  })
})

app.on('window-all-closed', () => {
  if (process.platform !== 'darwin') {
    app.quit();
  }
})

